<!--{template admin/tpl/header}-->

<div class="mainarea">
<div class="maininner">

<div class="tabs_header">
	<ul class="tabs">
		<li$actives[all]><a href="admincp.php?ac=$ac"><span>浏览全部列表</span></a></li>
		<li$actives[grade0]><a href="admincp.php?ac=$ac&perpage=20&grade=0&searchsubmit=1"><span>待审核活动</span></a></li>
		<li$actives[grade_1]><a href="admincp.php?ac=$ac&perpage=20&grade=-1&searchsubmit=1"><span>未通过审核活动</span></a></li>
		<li$actives[grade1]><a href="admincp.php?ac=$ac&perpage=20&grade=1&searchsubmit=1"><span>已通过审核活动</span></a></li>
		<li$actives[grade_2]><a href="admincp.php?ac=$ac&perpage=20&grade=-2&searchsubmit=1"><span>已关闭活动</span></a></li>
		<li$actives[grade2]><a href="admincp.php?ac=$ac&perpage=20&grade=2&searchsubmit=1"><span>推荐活动</span></a></li>
	</ul>
</div>

	<form method="get" action="admincp.php">
	<div class="block style4">
		<table cellspacing="3" cellpadding="3">
		<tr>
			<th>活动ID</th><td><input type="text" name="eventid" value="$_GET[eventid]"></td>
			<th>创建者UID</th><td><input type="text" name="uid" value="$_GET[uid]"></td>
		</tr>
		<tr>
			<th>标题*</th><td><input type="text" name="title" value="$_GET[title]"></td>
			<th>活动类型</th>
			<td>
				<select name="classid">
					<option value="">
						请选择活动分类
					</option>
					<!--{loop $_SGLOBAL[eventclass] $key $value}-->
					<option value="$key" <!--{if $_GET[classid] == $key}--> selected<!--{/if}-->>$value[classname]</option>
					<!--{/loop}-->
				</select>
			</td>
		</tr>
		<tr>
			<th>活动城市</th>
			<td id="citybox">
				<script type="text/javascript" src="source/script_city.js" charset="$_SC[charset]"></script>
                <script type="text/javascript" charset="$_SC[charset]">
					showprovince('province', 'city', '$_GET[province]', 'citybox');
                    showcity('city', '$_GET[city]', 'province', 'citybox');
                </script>
			</td>
			<th>公开性质</th>
			<td>
				<select name="public">
					<option value="">不限</option>
					<option value="0"<!--{if $_GET[public] === '0'}--> selected<!--{/if}-->>私密</option>
					<option value="1"<!--{if $_GET[public] === '1'}--> selected<!--{/if}-->>半公开</option>
					<option value="2"<!--{if $_GET[public] === '2'}--> selected<!--{/if}-->>完全公开</option>
				</select>
			</td>
		</tr>
		<tr>
			<th>活动时间</th>
			<td>
				<script type="text/javascript" src="source/script_calendar.js"></script>
				<input type="text" name="starttime" value="$_GET[starttime]" onclick="showcalendar(event,this,1)"/> ~
				<input type="text" name="endtime" value="$_GET[endtime]"  onclick="showcalendar(event,this,1)" />
			</td>
			<th>是否结束</th>
			<td>
				<select name="over">
					<option value="">不限</option>
					<option value="0"<!--{if $_GET[over] === '0'}--> selected<!--{/if}-->>未结束</option>
					<option value="1"<!--{if $_GET[over] === '1'}--> selected<!--{/if}-->>已结束</option>
				</select>
			</td>
		</tr>
		<tr>
			<th>活动状态</th>
			<td colspan="3">
				<select name="grade">
					<option value="">不限</option>
					<option value="-2"<!--{if $_GET[grade] === '-2'}--> selected<!--{/if}-->>已关闭</option>
					<option value="-1"<!--{if $_GET[grade] === '-1'}--> selected<!--{/if}-->>未通过审核</option>
					<option value="0"<!--{if $_GET[grade] === '0'}--> selected<!--{/if}-->>待审核</option>
					<option value="1"<!--{if $_GET[grade] === '1'}--> selected<!--{/if}-->>通过审核</option>
					<option value="2"<!--{if $_GET[grade] === '2'}--> selected<!--{/if}-->>推荐</option>
				</select>
			</td>
		</tr>
		<tr><th>热度</th><td colspan="3">
			<input type="text" name="hot1" value="$_GET[hot1]" size="10"> ~
			<input type="text" name="hot2" value="$_GET[hot2]" size="10">
		</td></tr>
		<tr>
			<th>结果排序</th>
			<td colspan="3">
				<select name="orderby">
					<option value="">默认排序</option>
					<option value="dateline"$orderby[dateline]>发布时间</option>
					<option value="starttime"$orderby[starttime]>开始时间</option>
					<option value="membernum"$orderby[membernum]>参加人数</option>
					<option value="hot"$orderby[hot]>热度</option>
				</select>
				<select name="ordersc">
					<option value="desc"$ordersc[desc]>递减</option>
					<option value="asc"$ordersc[asc]>递增</option>
				</select>
				<select name="perpage">
					<option value="20"$perpages[20]>每页显示20个</option>
					<option value="50"$perpages[50]>每页显示50个</option>
					<option value="100"$perpages[100]>每页显示100个</option>
					<option value="1000"$perpages[1000]>一次处理1000个</option>
				</select>
				<input type="hidden" name="ac" value="event">
				<input type="submit" name="searchsubmit" value="搜索" class="submit">
			</td>
		</tr>
		</table>
	</div>
	</form>

<!--{if $list}-->

	<form method="post" action="admincp.php?ac=event">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<div class="bdrcontent">

	<!--{if $perpage>100}-->
		<p>总共有满足条件的数据 <strong>$count</strong> 个</p>
		<!--{loop $list $value}-->
		<input type="hidden" name="ids[]" value="$value[eventid]">
		<!--{/loop}-->

	<!--{else}-->
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr>
			<td width="25">&nbsp;</td>
			<th>活动名称</th>
			<th width="80">活动城市</th>
			<th width="120">活动时间</th>
			<th width="80">参加/关注</th>
			<th width="80">发起者</th>
			<th width="40">操作</th>
		</tr>
		<!--{loop $list $value}-->
		<tr>
			<td>
				<input type="<!--{if $allowbatch}-->checkbox<!--{else}-->radio<!--{/if}-->" name="ids[]" value="$value[eventid]">
			</td>
			<td>
				<a href="space.php?do=event&id=$value[eventid]" target="_blank">$value[title]</a>
				<a class="gray" href="admincp.php?ac=event&grade=$value[grade]">
					<!--{if $value[grade] == 0}-->待审核
					<!--{elseif $value[grade]==-1}-->未通过审核
					<!--{elseif $value[grade]==2}-->推荐
					<!--{elseif $value[grade]==-2}-->已关闭
					<!--{/if}-->				
				</a>
				<!--{if $value[hot]}--><span style="color:red;">热度($value[hot])</span><!--{/if}-->
			</td>
			<td>
				<a href="admincp.php?ac=event&province=$value[province]">$value[province]</a> - 
				<a href="admincp.php?ac=event&province=$value[province]&city=$value[city]">$value[city]</a>
			</td>
			<td><!--{eval echo sgmdate('m-d',$value[starttime])}--> ~ <!--{eval echo sgmdate('m-d',$value[endtime])}--></td>
			<td>$value[membernum] / $value[follownum]</td>
			<td>
				<a href="space.php?uid=$value[uid]">$value[username]</a>
			</td>
			<td>
				<a href="cp.php?ac=event&op=edit&id=$value[eventid]" target="_blank">编辑</a>
			</td>
		</tr>
		<!--{/loop}-->
		</table>
	<!--{/if}-->
	</div>

	<div class="footactions">
		<input type="hidden" name="mpurl" value="$mpurl">
		<!--{if $allowbatch && $perpage<=100}-->
		<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')">全选
		<!--{/if}-->
		<input id="ckdelete" type="radio" name="optype" value="delete"><label for="ckdelete">删除</label>
		<input id="ckverify" type="radio" name="optype" value="verify"><label for="ckverify">通过审核</label>
		<input id="ckdelayverify" type="radio" name="optype" value="delayverify"><label for="ckdelayverify">不通过审核</label>
		<input id="ckrecommend" type="radio" name="optype" value="recommend"><label for="ckrecommend">推荐</label>
		<input id="ckunrecommend" type="radio" name="optype" value="unrecommend"><label for="ckunrecommend">取消推荐</label>
		<input type="submit" name="opsubmit" value="执行操作" onclick="if($('ckdelete').checked){return confirm('本操作不可恢复，确认继续？')};" class="submit">

		<div class="pages">$multi</div>
	</div>
	</form>
<!--{else}-->
	<div class="bdrcontent">
		<p>指定条件下还没有数据</p>
	</div>
<!--{/if}-->
</div>
</div>

<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->